const city = {
  state: {
    city: localStorage.city || "北京",
  },
  
  actions: {
    changecity({commit}, name) {
      commit("CHANGECITY", name)
    }
  },
  
  mutations: {
    CHANGECITY(state, name) {
      state.city = name;
      localStorage.city = name;
    }
  }

}

export default city;